package com;

import com.business.event.DealWithClosedEvent;
import com.business.event.DealWithStartedEvent;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationListener;

@SpringBootApplication
public class Application {

	public static void main(String[] args) {
		SpringApplication application = new SpringApplication(Application.class);
		ApplicationListener[] listeners = new ApplicationListener[]{new DealWithClosedEvent(),new DealWithStartedEvent()};
		application.addListeners(listeners);
		application.setWebEnvironment(true);
		application.run(args);
	}
}
